{{extend 'layout.html'}}
<script type="text/javascript" src="/static/jquery.js"></script>
<script type="text/javascript" src="/static/common.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    $('#allkeys').click(checkAll);
    $("input[name='selected']").click(updateBtnAndBox);
});
</script>
<form action="" method="post">
<p class="below_h2"><a href="/admin/entry/new">New Entry</a> | <input id="delete_button" type="submit" value="Delete selected items" disabled="disabled" /></p>
<table class="list">
    <thead><tr>
        <th class="list_ids"><input id="allkeys" type="checkbox"/>ID</th>
        <th class="list_titles">Title</th>
        <th class="list_modified">Last Modified</th>
        <th class="list_empty"></th>
        <th></th>
    </tr></thead>
    <tbody>
        {{for entry in entries:}}
        <tr>
            <td class="list_ids"><input name="selected" type="checkbox" value="{{=entry.index}}"/>{{=entry.index}}</td>
            <td class="list_titles">{{=entry.title}}</td>
            <td class="list_modified">{{=entry.datestr()}}</td>
            <td class="list_empty"><a href="/admin/entry/edit/{{=entry.index}}">Edit</a></td>
            <td class="list_empty"><a href="/view/{{=entry.index}}">View</a></td>
        </tr>
        {{pass}}
    </tbody>
</table>

</form>
{{if links['prev']:}}
<a href="/admin/entry/{{=links['prev']}}">Prev</a>
{{pass}}
{{if links['next']:}}
<a href="/admin/entry/{{=links['next']}}">Next</a>
{{pass}}
